package com.wtx.fitness.mapper;

import com.wtx.fitness.entity.Announcement;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 公告Mapper接口
 */
@Mapper
public interface AnnouncementMapper {
  /**
   * 查询所有公告
   */
  List<Announcement> selectAll();

  /**
   * 分页查询公告
   */
  List<Announcement> selectByPage(int offset, int limit);

  /**
   * 根据ID查询公告
   */
  Announcement selectById(Integer id);

  /**
   * 新增公告
   */
  int insert(Announcement announcement);

  /**
   * 更新公告
   */
  int update(Announcement announcement);

  /**
   * 删除公告
   */
  int deleteById(Integer id);
}